
public class MyTest {

    public static void main(String[] args) throws Exception {
        NewCallableTask newCallableTask = new NewCallableTask();
        new Thread(newCallableTask).start();
        new Thread(newCallableTask).start();
        new Thread(newCallableTask).start();
    }

}


  class  NewCallableTask implements Runnable {
        int i=10000;
     @Override
     public synchronized  void run() {
        while (i>0){
          i=i-1;
            System.out.println(i);
        }

     }
 }